package com.yesjpt.web;

import com.yesjpt.serv.BaseServ;
import com.yesjpt.util.L;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
//@RequestMapping("/")
public class BaseController {

    @Autowired private BaseServ baseServ;

    // 根据城市名称查询/city?findByName?name=成都
    @GetMapping("/getConfig")
    public Object getConfig(String name) {
        L.i(new Throwable().getStackTrace()[0]);
        return baseServ.getConfig();
    }
    @GetMapping("/getNowTime")
    public Object getNowTime() {
        //L.i(new Throwable().getStackTrace()[0]);
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
    }
}




























